﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Krile.Kernel.Control;
using Wassrile.Searchs;

namespace Wassrile.Controls
{
    public partial class FavArgSetUI : SDataArgSetUI
    {
        public FavArgSetUI(SearchFavCount.FavSearchMethods method, int value)
        {
            InitializeComponent();
            searchMethodSelector.SelectedIndex = (int)method;
            favCountValue.Value = value;
        }

        public event Action<SearchFavCount.FavSearchMethods, int> OnAccepted;
        public override void Accepted()
        {
            if(OnAccepted != null)
                OnAccepted.Invoke((SearchFavCount.FavSearchMethods)searchMethodSelector.SelectedIndex, (int)favCountValue.Value);
        }
    }
}
